<div class="container-fluid">
    <div class="row-fluid">
        <div class="span3"><?php echo $this->partial('_menu.phtml') ?></div>
        <div class="span9">
            <div class="wrap">
                <div id="main-content">
                    <form name="frm" method="post" class="form-horizontal" action="<?php echo $this->baseUrl()?>/admin/catalog/save-catalog">
                        <h3>Edition</h3>
                    	<fieldset>
                    	<div class="control-group">
                    		<label class="control-label"> Nom : </label>
                    		<div class="controls">
                    			<?php echo $this->catalog['nom'] ?>
                    		</div>
                    	</div>
                    	<div class="control-group">
                    		<label class="control-label"> Prenom :</label>
                    		<div class="controls">
                    			<?php echo $this->catalog['prenom'] ?>
                    		</div>
                    	</div>
                    	<div class="control-group">
                    		<label class="control-label">Adresse :</label>
                    		<div class="controls">
                    			<?php echo $this->catalog['adresse'] ?>
                    		</div>
                    	</div>
                    	<div class="control-group">
                    		<label class="control-label">Code Postal :</label>
                    		<div class="controls">
                    			<?php echo $this->catalog['cp'] ?>
                    		</div>
                    	</div>
                    	<div class="control-group">
                    		<label class="control-label"> Localite :</label>
                    		<div class="controls">
                    			<?php echo $this->catalog['localite'] ?>
                    		</div>
                    	</div>
                    	<div class="control-group">
                    		<label class="control-label"> Pays : </label>
                    		<div class="controls">
                    			<?php echo $this->catalog['pays_nom'] ?>
                    		</div>
                    	</div>
                    	<div class="control-group">
                    		<label class="control-label"> Email :</label>
                    		<div class="controls">
                    			<?php echo $this->catalog['email'] ?>
                    		</div>
                    	</div>
                    	<div class="control-group">
                    		<label class="control-label"> Catalogue(s) : </label>
                    		<div class="controls">
                    		<?php
                    		$catalogModel = new Admin_Model_Catalog();
                    		$i = explode("|",$this->catalog['cat']);
                    		for ($compt=0; $compt < count($i); $compt++) {
                    			$c = explode(":",$i[$compt]);
                    			$catEnvoye = explode("|",$catOk);
                    			$rowset = $catalogModel->getDateVentes($c[0]);
                    			echo '<input type="checkbox" name="ok[]" value="'.$c[0].'"';
                    				for ($comptEnvoye=0; $comptEnvoye < count($catEnvoye); $comptEnvoye++) {
                    					if($catEnvoye[$comptEnvoye] == $c[0]) {
                    						echo " checked";
                    					}
                    				}
                    				echo '>';
                    			$dtvente = new DateTime($rowset['dtvente']);
                    			echo ' ' . $dtvente->format('d/m/Y');
                    			echo '<b>'.$c[1].'</b> exemplaire(s)';
                    		}
                    		?>
                    		</div>
                    	</div>
                    	<div class="control-group">
                    		<label class="control-label"> Total : </label>
                    		<div class="controls">
                    			<?php echo $this->catalog['total'] ?> &euro;
                    		</div>
                    	</div>
                    	<div class="control-group">
                    		<label class="control-label"> Moyen de paiement :</label>
                    		<div class="controls">
                    			<?php switch($this->catalog['moyen']){ case "C": echo 'Comptant'; break; case "V": echo 'Virement'; break; case "P": echo 'Paypal'; break; } ?>
                    		</div>
                    	</div>
                    	<div class="control-group">
                    		<label class="control-label"> Commande traitée ? </label>
                    		<div class="controls">
                    			<?php
                    				if($this->catalog['traitee'] != 1)
                    				{
                    			?>
                    					<input type="radio" name="traite" value="1"> Oui &nbsp; &nbsp;
                    					<input type="radio" name="traite" value="0"> Non
                    			<?
                    				}else{
                    					$dttraitee = new DateTime($this->catalog[dttraitee]);
                    					echo "Le " .$dttraitee->format('d/m/Y') ." à " .$this->catalog['hrtraitee'] ;
                    				}
                    			?>
                    		</div>
                    	</div>
                    	<div class="control-group">
                    		<label class="control-label"> Commande payée ? </label>
                    		<div class="controls">
                    			<input type="radio" name="paye" value="1"<?php if($this->paye == 1) echo "checked" ?>> Oui &nbsp; &nbsp;
                    			<input type="radio" name="paye" value="0"<?php if($this->paye == 0) echo "checked" ?>> Non
                    		</div>
                    	</div>
                    	<div align="center" style="width:400px">
                    		<input type="hidden" name="id" value="<?php echo $this->catalog['p_cmdcatalogue'] ?>">
                    		<input class="btn btn-primary" type="submit" name="submit" value="Sauver" />
                    	</div>
                    	</fieldset>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>